package net.wwang.blog.pojo.bo;

import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.sql.Timestamp;

@EntityListeners(AuditingEntityListener.class)
@Entity
@Table(name="refresh_token")
@Data
public class RefreshToken {
    @Id
    private String id;
    @Column(name = "refresh_token")
    private String refreshToken;
    @Column(name = "user_id")
    private String userId;
    @Column(name = "token_key")
    private String tokenKey;
    @CreatedDate
    @Column(name = "create_time")
    private Timestamp createTime;
    @LastModifiedDate
    @Column(name = "modify_time")
    private Timestamp updateTime;
}
